POV-Ray : Newsgroups : povray.beta-test : cubic spline bug : cubic spline bug Server Time
29 Jul 2024 16:21:29 EDT (-0400)
  cubic spline bug  
From:
Date: 16 Apr 2002 07:01:29
Message: <4j0obu8bqevuf7spm93rlj2nl7rp8tlkb7@4ax.com>
POV 3.5 RC1 icl on WinNT Sp 6 PII 233 with 128 MB

According to documentation "Val_1, Val_2, etc, are the value of the spline
parameter at each specific point. " (6.1.9). So when there is different point
for t=0 and t=1 than I expect that Spline(0) is different than Spline(1).
Below example shows that for cubic spline it is not true. When I parse below
script as is then it stops at last macro call and tells that both points are
the same. When I comment last line it parses ok. When prepare spline first,
and convert later (at macro call) there is everything ok as first part shows.

// START

#macro List() 0 <1,1,0> 1 <3,8,0> 2 <7,7,0> 3 <7,3,0> #end
#macro Test(S) cylinder{ S(0) S(1) 1 } #end

#local Spline = spline { List() };

Test( spline{ Spline linear_spline    } ) 
Test( spline{ Spline quadratic_spline } )
Test( spline{ Spline natural_spline   } )
Test( spline{ Spline cubic_spline     } )

Test( spline{ linear_spline    List() } ) 
Test( spline{ quadratic_spline List() } )
Test( spline{ natural_spline   List() } )
Test( spline{ cubic_spline     List() } )

// END

ABX


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.